package cn.edu.fzu.homemaking.sso.domain.entity;

import cn.edu.fzu.homemaking.sso.domain.enums.StatusEnum;
import lombok.Data;

@Data
public class Company {

    private Long       id;

    //公司名称
    private String     name;

    //统一信用代码:唯一标识一家公司
    private String     creditCode;

    //法定代表人
    private String     legalPerson;

    //营业执照
    private String     businessLicense;

    //联系人
    private String     contact;

    //联系电话
    private String     phone;
    //地区id
    private Long       areaId;
    //地址
    private String     address;
    //状态
    private StatusEnum status;

    public static Company build(String name, String creditCode, String legalPerson, String businessLicense,
                                String contact, String phone, Long areaId, String companyAddress, StatusEnum status) {
        Company company = new Company();
        company.setName(name);
        company.setCreditCode(creditCode);
        company.setLegalPerson(legalPerson);
        company.setBusinessLicense(businessLicense);
        company.setContact(contact);
        company.setPhone(phone);
        company.setAreaId(areaId);
        company.setAddress(companyAddress);
        company.setStatus(status);
        return company;
    }
}
